home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2800 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  10.1 KB

  1. Path: grafix.xs4all.nl!john.hendrikx
  2. Date: Sun, 04 Feb 96 16:11:49 GMT+1
  3. Newsgroups: comp.sys.amiga.programmer
  4. Distribution: world
  5. Subject: Re: Demo/game to OS friendly part II
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=iso-8859-1
  8. Content-Transfer-Encoding: 8bit
  9. From: john.hendrikx@grafix.xs4all.nl (John Hendrikx)
  10. Message-ID: <john.hendrikx.4bpe@grafix.xs4all.nl>
  11. Organization: Grafix Attack BBS Holland
  12.  
  13. In a message of 03 Feb 96 Peter McGavin wrote to All:
  14.  
  15.  >>> etc, internally PM> should use message-passing and packets.  The Amiga
  16.  >>> has a big advantage PM> over other platforms that messages don't have to
  17.  >>> be copied. 
  18.  
  19.  >> This advantage is likely to go away in the near future with a new OS
  20.  >> version or soon after that.  AT would be wise not to rely too much on
  21.  >> these 'side-effects' of a system which is not memory-protected.
  22.  
  23.  PM> I have to admit I'm skeptical about AT "adding" memory protection to
  24.  PM> AmigaOS.  It seems to me that full memory protection would either double
  25.  PM> the size of AmigaOS or make AmigaOS almost totally incompatible with
  26.  
  27. Full memory protection would certainly not double the size of AmigaOS (ie, the
  28. parameter checking and the new functions added).  I'm not suggesting however to
  29. check all parameters (although a 'checksum' could be calculated over critical
  30. structures for 'easy' parameter checking).  But even memory protection which
  31. just protects programs from each other by not allowing them to share the same
  32. memory would kill our current message system.  I think copying messages isn't
  33. as big an impact as some people think, after all, a good copying routine can
  34. copy over 200K every 1/50 of a second.
  35.  
  36.  PM> existing Amiga software.  In the former case AmigaOS loses its size
  37.  
  38. I'm not convinced about this either.  I always found that adding memory
  39. protection should be done ONLY for -new- programs.  These -new- programs would
  40. have more strict rules and aren't allowed to call some of the older AmigaOS,
  41. instead they have to use the new ones provided to basicly the same thing.  The
  42. old programs would all get run by a special task.  This special task is
  43. actually a -new- program which runs all the old programs.
  44.  
  45.  PM> advantage over other OSes.  In the latter case we'd might as well move
  46.  PM> to another OS.  In both cases AmigaOS loses its performance edge over
  47.  PM> other OSes.
  48.  
  49. I would stay with Amiga even if only 25% of all non-game software would run,
  50. with a HUGE step like this (ie, to PPC) I think that's worth it.  Besides, a
  51. lot of software could simply need a recompile to get back running again; the
  52. step to PPC really requires a good recompile anyway (or be stuck with emulated
  53. 680x0 code).
  54.  
  55. Also the new software will be far superior to any of the old software so soon
  56. you will be looking at your old software as if it was a program still using a
  57. GUI looking like Kick 1.3.
  58.  
  59. I don't think AmigaOS could ever lose its performance edge given what's out
  60. there, all I know is that memory-protection is a MUST for an OS which wants to
  61. be a serious alternative in the OS market, especially one due for release in
  62. 1997.
  63.  
  64. If AT don't add memory protection in the new version of the OS they should
  65. atleast considerably change the rules and provide new functions so memory
  66. protection could be added easy later on.  Memory protection is coming sooner or
  67. later, you can't go around it, so I sincerely hope AT takes this into account
  68. now, before it truly becomes impossible to add memory protection.
  69.  
  70.  PM> If AT are serious about implementing full memory protection then I think
  71.  PM> a straightforward approach is:
  72.  
  73.  PM>   o  Throw away exec and all device-drivers.  Start again with the
  74.  PM>      kernel and device drivers from another OS like Unix, WinNT or
  75.  PM>      some research OS instead.
  76.  
  77. They can write their own kernel just as easily, and then they can adapt it to
  78. fit into the current AmigaOS structure more easily.  Kernels are hardly
  79. difficult to write.  Some people even seem to think that multitasking is
  80. somekind of obscure magic which Amiga and some other OS-es 'invented' and isn't
  81. documented anywhere.
  82.  
  83.  PM>   o  Tweak the interface to look as much like exec as possible within
  84.  PM>      the constraints of full memory protection.
  85.  
  86. See above.
  87.  
  88.  PM>   o  Port other libraries.  Graphics, DOS and maybe other libraries,
  89.  PM>      require a major redesign and rewrite because they can no longer
  90.  PM>      use public structures.
  91.  
  92.  PM>   o  Port WorkBench, shell commands, prefs, as many applications as
  93.  PM>      possible, etc.
  94.  
  95.  PM> OK another approach, that would be just as (in)compatible, is to
  96.  PM> implement an AmigaOS lookalike API over Unix or WinNT.  About the only
  97.  PM> thing that might be impossible this way (and possible by the first
  98.  PM> approach) is the concept of multiple simultaneous Screens in different
  99.  PM> resolutions and frequencies.
  100.  
  101.  PM> Either approach would probably take years longer than a straight port of
  102.  PM> AmigaOS to PPC and practically all compatibility with existing software
  103.  PM> would be lost.
  104.  
  105. There are less radical approaches.  Myself I probably would have gone for a two
  106. step approach.  First release a new OS, with new functions to replace some of
  107. the 'problem' functions for a mem-protected system.  Also give this new OS a
  108. new set of rules to ensure a smooth transition later.
  109.  
  110. This first release (OS4.0) would not be mem-protected at all (although if you
  111. use the new allocmem functions provided you could get protected memory
  112. already).  This first release could have parameter checking in some functions
  113. already (especially the newer functions) but there wouldn't yet be any memory
  114. protection.  The primary function of this first release would be to get as much
  115. programs to start following the new rules, and use the new functions and
  116. totally avoid the old functions which the new functions replace.  The new rules
  117. would of course be rules designed to reduce problems with the transistion to a
  118. mem-protected system.
  119.  
  120. Then after 1 or 2 years (ie, in 1998/99) the 2nd release (OS4.1) of AmigaOS
  121. would have full memory protection.  At that moment NO old programs will
  122. function anymore (ie, programs designed for OS3.1 and earlier).  The OS4.0
  123. programs which use the new functions and follow the new rules will have a VERY
  124. good chance to run on the new OS4.1 with mem-protection.
  125.  
  126. This gives software writers a span of 1-2 years in which they can make their
  127. program OS4.0 compliant (so they would need to modify and recompile their
  128. programs a bit, so 1-2 years should be quite a reasonable time-span).  OS4.0
  129. would basicly be the OS which runs both OS3.1 programs and OS4.1 programs. 
  130. OS4.1 would only run OS4.0 compliant programs and all new programs.
  131.  
  132.  >> while the current system, although less straightforward can just queu
  133.  >> gfx-actions in a list (some current blitter functions do this) which
  134.  >> achieves much the same effect.
  135.  
  136.  PM> I can't tell whether you're talking about QBlit() or high-level gfx
  137.  PM> functions here.  QBlit() is too low-level because it insists on poking
  138.  
  139. I'm not sure, but I think that graphics.library uses QBlit() internally for a
  140. lot of its functions.
  141.  
  142.  PM> hardware registers.  Ability to queue high-level functions is what I'm
  143.  PM> talking about.  In the current implementation, only one high-level
  144.  PM> function can be queued at a time, unless the application starts a task
  145.  PM> to process longer queues.  Why not let the OS do this and save the
  146.  PM> programmer the trouble?
  147.  
  148. Why?  Well, I don't really see any advantage in this.  What is there to gain?
  149.  
  150.  >> I think RTG will do what you want just fine, what you're suggesting would
  151.  >> just make things even slower although it has some advantages.
  152.  
  153.  PM> We're talking about different implementations of RTG here aren't we? not
  154.  PM> RTG vs non-RTG.  Indeed, maybe your framebuffer allocation isn't RTG and
  155.  PM> message-passing is!  A message-passing implementation won't always be
  156.  PM> slower, quite often faster.
  157.  
  158. My vision of RTG is a bit simpler.  It would be a library based system (but I'm
  159. sure they don't have to be libraries). It would consist of 3 layers:
  160.  
  161.  * Low-level gfx-card specific library
  162.  * Medium-level RTG library
  163.  * High-level RTG graphics.library (ie, an enhanced graphics.library)
  164.  
  165. The low-level library would be a collection of basic gfx-operations.  Each
  166. low-level library has the same structure, and the same function entry points. 
  167. So the 'plot-pixel' function is always found at the same negative offset.  This
  168. low-level library would have 2 entry points for each available function.  One
  169. for sync, and one for async operation.  It would also have a few standard
  170. functions to query the library.
  171.  
  172. Now, the medium-level RTG library is the library which distinguishes which
  173. low-level library the calls it gets are to be passed to.  As each function is
  174. passed a rastport, or some other kind of structure this could be very fast.
  175. Infact, it could be nothing more then grabbing the low-level library base out
  176. of the structure and calling the appropriate function.  This medium-level layer
  177. is provided however so that low-level functions not available can be emulated
  178. by the medium-level RTG library by calling several low-level functions.
  179.  
  180. This medium-level should be documented well as programs might want to use it
  181. directly.  The low-level libs are not to be called directly ever.
  182.  
  183. The high-level graphics library should offer you a good way to do synchronous
  184. or asynchronous gfx on top of the functionality it provides now.
  185.  
  186.  PM> I think the system could incorporate both methods.  However a program
  187.  PM> which uses framebuffer-allocation and direct hardware access will only
  188.  PM> work properly on memory-mapped devices (in the right format).  It won't
  189.  
  190. Of course, the framebuffer has to be linear mapped, none of that segmented
  191. crap.
  192.  
  193.  PM> work on things like OpalVision (which isn't memory-mapped) or networks
  194.  PM> (except perhaps with slow emulation).
  195.  
  196. No true, but programs which require framebuffer direct access to get speed (why
  197. use it otherwise?) wouldn't run nicely on OpalVision, or some of the segmented
  198. Z-II cards anyway.
  199.  
  200. Grtz John
  201.  
  202. -----------------------------------------------------------------------
  203.  John.Hendrikx@grafix.xs4all.nl   TextDemo/FastView/Etc... development
  204. -----------------------------------------------------------------------
  205. -- Via Xenolink 1.981, XenolinkUUCP 1.1
  206.